package com.google.code.gaeom;

import java.util.List;
import java.util.Map;

import com.google.appengine.api.datastore.Key;

/**
 * @author Peter Murray <gaeom@pmurray.com>
 */
public interface ObjectStoreSession
{
	public ObjectStore getObjectStore();

	public Key getKey(Object object);

	public Map<Object, Key> getKeys(Iterable<?> objects);

	public Store.Multi store(Iterable<?> objects);

	public Store.Multi store(Object... objects);

	public Store.Single store(Object object);

	public <T> LoadId<T> load(Class<T> type);

	public LoadKey.Single load(Key key);

	public LoadKey.Multi load(Key... keys);

	public LoadKey.Multi load(Iterable<Key> keys);

	public <T> Find<T> find(Class<T> type);

	public <T> Terminator<T> refresh(T object);

	public <T> Terminator<List<T>> refresh(T... objects);

	public <T> Terminator<List<T>> refresh(Iterable<T> objects);

	public Delete delete();
}
